package cloud.zhixinglu.www.spring.boot.mybatis.service.impl;


import cloud.zhixinglu.www.spring.boot.mybatis.entity.TestEntity;
import cloud.zhixinglu.www.spring.boot.mybatis.mapper.TestMapper;
import cloud.zhixinglu.www.spring.boot.mybatis.service.TestService;
import com.github.pagehelper.Page;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 *  服务层实现。
 *
 * @author WeiXin
 * @since 2023-08-12
 */
@Service
public class TestServiceImpl implements TestService {

    @Resource
    private TestMapper mapper;

    @Override
    public TestEntity getTestByOperationId(String operationId) {
        return mapper.getTestByOperationId(operationId);
    }

    @Override
    public List<TestEntity> getTestListByOperationId(String operationId) {
        return mapper.getTestListByOperationId(operationId);
    }

    /**
     * 获取指定个数的列表信息
     *
     * @param limit {@link Integer} 信息个数
     * @return List<TestEntity>
     */
    @Override
    public List<TestEntity> selectListByLimit(Integer limit) {
        return mapper.selectListByLimit(limit);
    }

    /**
     * 分页获取测试数据列表
     *
     * @param page {@link Page <TestEntity>}
     * @return Page<TestEntity>
     */
    @Override
    public Page<TestEntity> selectTestListByPage(Page<TestEntity> page) {
        return mapper.selectTestListByPage(page);
    }


}
